import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  { path: '/', name: 'HomePage', component: () => import('../views/HomePage.vue') },
  { path: '/products', name: 'ProductList', component: () => import('../views/ProductList.vue') },
  { path: '/about', name: 'AboutPage', component: () => import('../views/AboutPage.vue') },

  {
    path: '/product/:id',
    name: 'ProductDetail',
    component: () => import('../views/ProductDetail.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
